package com.msb.common.util;

import com.msb.common.model.StandardSubmit;

import java.util.concurrent.ConcurrentHashMap;

/**
 * @Author: lmf
 * @Create: 2025/3/22 8:34
 * @module
 */
public class CMPPSubmitRepoMapUtil {

    public static ConcurrentHashMap<String, StandardSubmit> map = new ConcurrentHashMap<>();

    /**
     * 添加到map中
     * @param sequence 序列号
     * @param submit 提交对象
     */
    public static void put(int sequence, StandardSubmit submit) {
        map.put(String.valueOf(sequence), submit);
    }

    /**
     * 从map中获取对象
     */
    public static StandardSubmit get(int sequence){
        return map.get(String.valueOf(sequence));
    }

    /**
     * 删除map中数据
     */
    public static StandardSubmit remove(int sequence){
        return map.remove(String.valueOf(sequence));
    }
}
